package com.cskaoyan.bean.chaosbean.config.bo;

import lombok.Data;

import javax.validation.constraints.Min;
import java.util.ArrayList;
import java.util.HashMap;

/**
 * @author 楚夏三分
 * @datetime 2022/12/31 10:06
 * @description: TODO:
 */
@Data
public class AdminConfigWXBo {



    private String market_wx_share;
    @Min(0)
    private Integer market_wx_index_new;
    @Min(0)
    private Integer market_wx_index_topic;
    @Min(0)
    private Integer market_wx_index_brand;
    @Min(0)
    private Integer market_wx_catlog_goods;
    @Min(0)
    private Integer market_wx_catlog_list;
    @Min(0)
    private Integer market_wx_index_hot;

    public static ArrayList<String> getList(){
        ArrayList<String> list = new ArrayList<>();
        list.add("market_wx_index_new");
        list.add("market_wx_index_topic");
        list.add("market_wx_share");
        list.add("market_wx_index_brand");
        list.add("market_wx_catlog_goods");
        list.add("market_wx_catlog_list");
        list.add("market_wx_index_hot");

        return list;

    }

    public static HashMap<String,String> getMap(AdminConfigWXBo adminConfigWXBo){
        HashMap<String, String> map = new HashMap<>();
        map.put("market_wx_share",adminConfigWXBo.getMarket_wx_share());
        map.put("market_wx_index_new",adminConfigWXBo.getMarket_wx_index_new().toString());
        map.put("market_wx_index_topic",adminConfigWXBo.getMarket_wx_index_topic().toString());
        map.put("market_wx_index_brand",adminConfigWXBo.getMarket_wx_index_brand().toString());
        map.put("market_wx_catlog_goods",adminConfigWXBo.getMarket_wx_catlog_goods().toString());
        map.put("market_wx_catlog_list",adminConfigWXBo.getMarket_wx_catlog_list().toString());
        map.put("market_wx_index_hot",adminConfigWXBo.getMarket_wx_index_hot().toString());
        return map;
    }

}
